package com.zhentao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhentao.pojo.WorkflowHistory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 流程历史Mapper接口
 */
@Mapper
public interface WorkflowHistoryMapper extends BaseMapper<WorkflowHistory> {
    
    /**
     * 根据任务ID查询历史记录
     */
    @Select("SELECT * FROM workflow_history WHERE task_id = #{taskId} ORDER BY action_time")
    List<WorkflowHistory> selectByTaskId(Long taskId);
} 